package com.example.mobile2021606185zhn0427;

import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import android.os.Bundle;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends AppCompatActivity {
    private RecyclerView rvMainPart;
    private List<tingchechang> list = new ArrayList();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        rvMainPart = findViewById(R.id.rvMainPary);
        list.add(new tingchechang(R.drawable.tcc1, "广东停车场", 5, 12.5, 50, "广东省广州市海珠区"));
        list.add(new tingchechang(R.drawable.tcc2, "广州停车场", 5, 12.5, 50, "广东省广州市海珠区"));
        list.add(new tingchechang(R.drawable.tcc3, "广东停车场", 5, 12.5, 50, "广东省广州市海珠区"));
        list.add(new tingchechang(R.drawable.tcc4, "广东停车场", 5, 12.5, 50, "广东省广州市海珠区"));
        list.add(new tingchechang(R.drawable.tcc6, "广东停车场", 5, 12.5, 50, "广东省广州市海珠区"));
        rvMainPart.setLayoutManager(new LinearLayoutManager(this));
        PartRViewAdapter partRViewAdapter = new PartRViewAdapter(list);
        rvMainPart.setAdapter(partRViewAdapter);
    }
}